package com.example.springbootmybatis.service.impl;


import com.example.springbootmybatis.dao.CompanyUserMapper;
import com.example.springbootmybatis.model.CompanyUser;
import com.example.springbootmybatis.service.UserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author alone
 */
@Service
public class UserServiceImpl implements UserService {
    @Resource
    private CompanyUserMapper companyUserMapper;

    @Override
    public int saveUser(CompanyUser user) {
       int operation =  companyUserMapper.insertSelective(user);
        return operation;
    }

    @Override
    public CompanyUser getUserById(Integer userId) {
        CompanyUser user = companyUserMapper.findById(userId);
        return user;
    }

    @Override
    public List<CompanyUser> getUserByIdNumberAndMobile(Object idNumber, Object mobile) {
        return null;
    }


}
